﻿<?xml version="1.0" encoding="utf-8"?>
<Rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UseGlobalActionOnly="true">
  <WkfStates>
    <WkfState Value="Started">
      <Actions>
        <Action Identifier="1200" UiTypeAction="Validate" ValidatingMode="One">
          <Conditions>
            <Condition Target="Document" IsFinalState="false" StateMode="One" NewState="Validated" />
            <Condition Target="Workflow" IsFinalState="true" NewState="Validated" />
          </Conditions>
        </Action>
        <Action Identifier="1202" UiTypeAction="Refuse" >
          <Conditions>
            <Condition Target="Document" IsFinalState="false" StateMode="One" NewState="Rejected" />
            <Condition Target="Workflow" IsFinalState="true" NewState="Rejected" />
          </Conditions>
        </Action>
        <Action Identifier="1201" IsEnabled="false" UiTypeAction="Reply" >
          <ActionParameters>
            <ActionParameter Name="OrganizationId" Value="2" />
            <ActionParameter Name="FolderTypeId" Value="5" />
          </ActionParameters>
          <Conditions>
            <Condition Target="Document" IsFinalState="false" StateMode="One" NewState="Replied" />
            <Condition Target="Workflow" IsFinalState="true" NewState="Replied" />
          </Conditions>
        </Action>
        <Action Identifier="0" UiTypeAction="Revive" IsOption="true" IsSenderOnly="true"/>
      </Actions>
    </WkfState>
    <WkfState Value="Validated">
      <Actions>
        <Action Identifier="0" UiTypeAction="Index" IsOption="true" />
      </Actions>
    </WkfState>
    <WkfState Value="Rejected">
      <Actions>
        <Action Identifier="1000" UiTypeAction="Ventilate" IsSenderOnly="true"/>
        <Action Identifier="0" UiTypeAction="Index" IsOption="true" />      
      </Actions>
    </WkfState>
    <WkfState Value="Replied">
      <Actions>
        <Action Identifier="0" UiTypeAction="Index" IsOption="true" />
      </Actions>
    </WkfState>
  </WkfStates>
</Rules>